package com.hxit.mapper;

import com.hxit.pojo.ConversationKnowledgeBase;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ConversationKnowledgeBaseMapper {
    /**
     * 增加对话知识点
     */
    void insertConversationKnowledgeBase(ConversationKnowledgeBase conversationKnowledgeBase);

    /**
     * 查询对话知识点
     * @return
     */
    @Select("select * from conversationknowledgebase")
    List<ConversationKnowledgeBase> selectConversationKnowledgeBase();


    /**
     * 删除对话知识点
     */
    @Delete("delete from conversationknowledgebase where conversation_id = #{conversationId} and knowledge_id = #{knowledgeId}")
    void deleteConversationKnowledgeBase(ConversationKnowledgeBase conversationKnowledgeBase);
}
